﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Http;

namespace 医院预约Web.Controllers
{
    public class StopperController : Controller
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)//override(重写,覆盖)
        {
            string name = HttpContext.Session.GetString("name");
            if (name==null)
            {
                HttpContext.Response.Redirect("/Home/login");//重定至登陆页面
                return;
            }
            base.OnActionExecuting(filterContext);
        }
    }
}